const Type = require('../../model/type/Type')

function change(req,res){
  console.log(req.query)
  Type.findByIdAndUpdate(req.query.id, {typename: req.query.typename}, function(err,result){
    if (err) {
        res.json({
            code:0,
            msg: '更新失败'
        })
    }else{
        res.json({
            code:1,
            msg: '更新成功'
        })
    }
  })

}
module.exports = change